import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
const request = {
    //初始化
    WiththeunitInitialization (params) {
        return httpPost({
            url: '/outer/facto/out/sourcer/init',
            params
        })
    },
    //新增往来单位
    WiththeunitAdd (params) {
        return httpPost({
            url: '/outer/businessunit/create',
            params
        })
    },
    //根据条件分页查询往来单位
    WiththeunitList (params) {
        return httpPost({
            url: '/outer/businessunit/listByEntity',
            params
        })
    },
    //获取用户在功能下的的功能权限
    getJurisdiction (params) {
        return httpGet({
            url: '/permission/functional/getFunctional',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //根据表单id查询往来单位信息
    WiththeunitDetails (params) {
        return httpGet({
            url: '/outer/businessunit/findById',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //修改往来单位
    WiththeunitUpdate (params) {
        return httpPost({
            url: '/outer/businessunit/update',
            params,
        })
    },
    //查询往来单位
    GetWiththeunit (params) {
        return httpPost({
            url: '/outer/businessunit/findByBusinessunitId',
            params,
        })
    },
}
export default request